#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import collectioninfo_blueprint
from api_1_0.collectionInfoResource.collectionInfoResource import CollectionInfoResource
from api_1_0.collectionInfoResource.collectionInfoOtherResource import CollectionInfoOtherResource

api = Api(collectioninfo_blueprint)

api.add_resource(CollectionInfoResource, '/collectionInfo/<AutoID>', '/collectionInfo', endpoint='collectionInfo')


# joint query
@collectioninfo_blueprint.route('/collectionInfo/query', methods=['GET'], endpoint='collectionInfo_query')
def CollectionInfo_query():
    return CollectionInfoOtherResource.joint_query()

@collectioninfo_blueprint.route('/collectionInfo/collect', methods=['POST'], endpoint='collectionInfo_collect')
def CollectionInfo_collect():
    return CollectionInfoOtherResource.collect()


#查看收藏
@collectioninfo_blueprint.route('/collectionInfo/getcollectinfo', methods=['GET'], endpoint='collectionInfo_getcollectinfo')
def CollectionInfo_getcollectinfo():
    return CollectionInfoOtherResource.getcollectinfo()

